cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
        leftname:{
            default : null,
            type:cc.Label,
        },
        rightname:{
            default : null,
            type:cc.Label,
        },
        person:{
            default : null,
            type:cc.Sprite,
        },
        bg : cc.Sprite,
    },
    
    // use this for initialization
    onLoad: function () {
        var leftname = this.leftname
         //一次性的计时器
        // var mySch =function(){ console.log("schedule Once log..."); 
        //  leftname.String = "嘎嘎嘎";
        
        // }
        // this.scheduleOnce(mySch,1);
      //  this.unschedule(mySch);
        //取消定时器
        //不延迟，永久重复
        // this.schedule(function(){
        //     console.log("schedule log...");
        // },1);
        
        //不延迟，有重复次数限定
         this.schedule(function(){
             leftname.string = "嘎嘎嘎";
             console.log("schedule log...");
         },3,1);
    },

    // called every frame, uncomment this function to activate update callback
    update: function (dt) {

    },
});
